package com.yanqu.road.entity.notice;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

/**
 * 通知用户的记录
 */
@FieldTypeAnnotation(tableName = "t_u_notice_record")
public class NoticeRecord extends DataObject {

    @FieldTypeAnnotation(select = true, desc = "用户id")
    private long userId;

    /**
     * 通知类型，eNoticeType.class
     */
    @FieldTypeAnnotation(select = true, desc = "通知类型")
    private int noticeType;

    @FieldTypeAnnotation(select = true, update = true, desc = "通知时间，单位毫秒")
    private long notifyTime;

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public void setNoticeType(int noticeType) {
        this.noticeType = noticeType;
    }

    public void setNotifyTime(long notifyTime) {
        if (this.notifyTime != notifyTime) {
            this.notifyTime = notifyTime;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public int getNoticeType() {
        return noticeType;
    }

    public long getNotifyTime() {
        return notifyTime;
    }
}
